﻿namespace WeixinPay.Models
{
    using Kevin.Comm.Strings;
    using System;
    using System.Runtime.CompilerServices;
    using WeixinPay.Business;

    public class DeliverNotify
    {
        public void Sign()
        {
            string password = string.Format("appid={0}&appkey={1}&deliver_msg={2}&deliver_status={3}&deliver_timestamp={4}&openid={5}&out_trade_no={6}&transid={7}", new object[] { this.appid, Config.AppKey, this.deliver_msg, this.deliver_status, this.deliver_timestamp, this.openid, this.out_trade_no, this.transid });
            this.app_signature = StringFunction.NoneEncrypt(password, 0).ToLower();
        }

        public string app_signature { get; set; }

        public string appid { get; set; }

        public string deliver_msg { get; set; }

        public string deliver_status { get; set; }

        public string deliver_timestamp { get; set; }

        public string openid { get; set; }

        public string out_trade_no { get; set; }

        public string sign_method { get; set; }

        public string transid { get; set; }
    }
}

